<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
	"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>Files palette basic tests</title>

	<!-- CUSTOMIZATION: Make sure "../" URLs for href/src attributes are correct -->
	<link rel="stylesheet" type="text/css" href="../css/testplan.css" />
</head>

<body>
	<div class="navbar">
		<a href="./" title="show directory contents"><code>./</code> (show contents of this directory)</a>
		&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="../" title="show directory contents"><code>../</code> (show contents of parent directory)</a>
	</div>
	<hr />
	<h1 class="test_title">Files palette basic tests</h1>

	<h2 class="test_section">Initial view, tree controls, context menu, double-click behaviors</h2>
	<h3 class="steps_subsection">Steps</h3>
	<ol class="steps">
		<li>You'll want to setup a virgin user environment by creating a whole new user login or resetting the existing user login (ask engineers about how to do that).
				Clear the browser cache. Launch the Maqetta server. Login if necessary. </li>
		<li>Look at Files palette. You should see an initial set of files: app.css, app.js, and then some folders: libs, sample, themes. </li>
		<li>Verify the tree control and that you can expand and close folders by clicking on + and - squares.</li>
		<li>With the mouse inside of the Files palette's main area, click the right mouse button (or Ctrl-click on Mac) to bring up context menu. 
		You should see "Rename...", "Delete" and "Download". (Don't activate these commands yet - see below for specific tests for each of these commands.)</li>
		<li>Try double-clicking on the various file types to make sure that the appropriate editor is launched.
			<ul>
				<li>Double-click on Sample1.html. The page editor should show the sample contents, which (with 0.5 completed) should include a states demo where some controls appear and disappear at runtime depending on what the user clicks on at runtime.</li>
				<li>Double-click on SampleJs.js. The source editor should show the JavaScript source code.</li>
				<li>Double-click on SampleBanner.jpg. The image should appear in an editor tab.</li>
				<li>Go into themes/claro. Double-click on a *.css, then on a *.json file. The source editor should show the CSS and JSON source code, respectively.</li>
				<li>Go into themes/claro. Double-click on claro.theme. This should launch the Dojo/Claro theme editor.</li>
			</ul>
		</li>
	</ol>
	<h3 class="expectedResults_subsection">Expected results</h3>
	<ol class="expectedResults">
		<li>See description above for expected results.
		</li>
	</ol>

	<h2 class="test_section">new files and folders</h2>
	<h3 class="steps_subsection">Steps</h3>
	<ol class="steps">
		<li>You'll want to set up a virgin user environment by creating a whole new user login or resetting the existing user login (ask engineers about how to do that).
				Clear the browser cache. Launch the Maqetta server. Login if necessary. </li>
		<li>For the rest of this test, the term "root-level file" means a file in the workspace root folder, not in a subfolder</li>
		<!-- FIXME: Maybe restore this if we get Save/SaveAs buttons in toolbar for generic New File source editing. See #43
		<li>With the mouse inside of the Files palette's main area, click on one of the "root-level files" (e.g., Sample.html) and then click the right mouse button (or Ctrl-click on Mac) to bring up context menu and choose "New file...". In the dialog(s) that appear, type in an HTML file name (e.g., abc.html), click OK, and the page editor should appear with an empty canvas.</li>
		<li>With the mouse inside of the Files palette's main area, click on one of the root-level files (e.g., Sample.html) and then click the right mouse button (or Ctrl-click on Mac) to bring up context menu and choose "New file...". In the dialog(s) that appear, type in a JS file name (e.g., abc.js), click OK, and the source editor should appear with an empty JavaScript file.</li>
		-->
		<li>With the mouse inside of the Files palette's main area, click on one of the root-level files (e.g., app.css) and 
		then click on the "New folder..." icon on toolbar. 
		In the dialog(s) that appear, enter a new folder name (e.g., "aaaa") and clock OK. The new folder should show in the Files palette.</li>
		<!-- FIXME: Maybe restore this if we get Save/SaveAs buttons in toolbar for generic New File source editing. See #43
		<li>With the mouse inside of the Files palette's main area, click on one of the your new folder (e.g., aaaa) and then click the right mouse button (or Ctrl-click on Mac) to bring up context menu and choose "New file...". In the dialog(s) that appear, make sure the dialog shows the proper folder name (e.g., aaaa). Type in an HTML file name (e.g., bbbb.html), click OK, and the page editor should appear with an empty canvas, and the Files palette should should bbb.html in folder aaaa.</li>
		-->
	</ol>
	<h3 class="expectedResults_subsection">Expected results</h3>
	<ol class="expectedResults">
		<li>See description above for expected results.
		</li>
	</ol>

	<h2 class="test_section">add files</h2>
	<h3 class="steps_subsection">Steps</h3>
	<ol class="steps">
		<li>You'll want to set up a virgin user environment by creating a whole new user login or 
			resetting the existing user login (ask engineers about how to do that).
			Clear the browser cache. Launch the Maqetta server. Login if necessary. </li>
		<li>With the mouse inside of the Files palette's main area, 
			click on one of the root-level files (e.g., Sample.html) and then 
			click on the "Upload Files" icon on the <strong>Files</strong> palette toolbar. In the dialog(s) that appear, choose a file from your 
			disk and upload to your workspace. The new file should have been added 
			into the root folder in the Files palette.</li>
		<li>Create a new folder (see instructions above), perhaps named "ggg". 
			With the mouse inside of the Files palette's main area, 
			click on thie folder (e.g., ggg) and then click on the "Upload Files" icon on the <strong>Files</strong> palette toolbar. 
			In the dialog(s) that appear, choose a file from your disk and 
			upload to your workspace. The new file should have been added into the ggg 
			folder in the Files palette.</li>
	</ol>
	<h3 class="expectedResults_subsection">Expected results</h3>
	<ol class="expectedResults">
		<li>See description above for expected results.</li>
	</ol>

	<h2 class="test_section">delete files</h2>
	<h3 class="steps_subsection">Steps</h3>
	<ol class="steps">
		<li>You'll want to set up a virgin user environment by creating a whole new user login or resetting the existing user login (ask engineers about how to do that).
				Clear the browser cache. Launch the Maqetta server. Login if necessary. </li>
		<li>Add a new HTML file, such as mmm.html (see above for instructions). Close the page editor tab that appears. Then, in the Files palette, click on mmm.html and then click the right mouse button (or Ctrl-click on Mac) to bring up context menu and choose "Delete". Click OK on "are you sure" warning dialog. The Files palette should no longer show the file.</li>
		<li>Create a new folder (see instructions above), perhaps named "nnn". Add a new file (e.g., ooo.html) into that folder (see instructions above). Close the page editor tab that appears.  Then, in the Files palette, click on ooo.html and then click the right mouse button (or Ctrl-click on Mac) to bring up context menu and choose "Delete". Click OK on "are you sure" warning dialog. The Files palette should no longer show the file.</li>
		<li>Create a new folder (e.g., www) and add a file into that folder (e.g., via New operations - see instructions above for how to do this.) In the Files palette, click on www and then click the right mouse button (or Ctrl-click on Mac) to bring up context menu and choose "Delete". Click OK on "are you sure" warning dialog. The Files palette should no longer show the folder (or any of the files that were in the folder).</li>
	</ol>
	<h3 class="expectedResults_subsection">Expected results</h3>
	<ol class="expectedResults">
		<li>See description above for expected results.</li>
	</ol>

    <h2 class="test_section">rename files</h2>
    <h3 class="steps_subsection">Steps</h3>
    <ol class="steps">
        <li>You'll want to set up a virgin user environment by creating a whole new user login or resetting the existing user login (ask engineers about how to do that).
                Clear the browser cache. Launch the Maqetta server. Login if necessary. </li>
        <li>Add a new HTML file, such as mmm.html (see above for instructions). Close the page editor tab that appears. Then, in the Files palette, click on mmm.html and then click the right mouse button (or Ctrl-click on Mac) to bring up context menu and choose "Rename..." and enter a new name (e.g., mmm2.html). The Files palette should show mmm2.html instead of mmm.html.</li>
        <li>Create a new folder (see instructions above), perhaps named "n2". Add a new file (e.g., o2.html) into that folder (see instructions above). Close the page editor tab that appears.  Then, in the Files palette, click on ooo.html and then click the right mouse button (or Ctrl-click on Mac) to bring up context menu and choose "Rename...". Enter a new name (e.g., o3.html). 
        The Files palette should show the renamed files.</li>
    </ol>
    <h3 class="expectedResults_subsection">Expected results</h3>
    <ol class="expectedResults">
        <li>See description above for expected results.</li>
    </ol>

	<h2 class="test_section">download as ZIP (context menu)</h2>
	<h3 class="steps_subsection">Steps</h3>
	<ol class="steps">
		<li>Click on one file in Files palette to select it. 
			Right-click on file to bring up context menu and select "Download". In dialog, accept default name (download.zip). 
			A file named download.zip should be in your browser's download area.</li>
		<li>Click on one file in Files palette to select it, then Ctl-click (Cmd-Click on Mac) on two other files to select them, also. 
			Right-click on file to bring up context menu and select "Download". In dialog, type in "download2". 
			A file named download2.zip should be in your browser's download area with the three files inside.</li>
		<li>Select the ./themes/sketch folder. 
			Right-click on file to bring up context menu and select "Download". In dialog, type in "download3". 
			A file named download3.zip should be in your browser's download area with all of the files from that folder inside.</li>
	</ol>
	<h3 class="expectedResults_subsection">Expected results</h3>
	<ol class="expectedResults">
		<li>See description above for expected results.</li>
	</ol>


    <h2 class="test_section">File palette toolbar: download as ZIP and modify libraries</h2>
    <h3 class="steps_subsection">Steps</h3>
    <ol class="steps">
        <li>Click on the first icon at button bar of Files palette to download entire workspace. 
            Complete process (accepting defaults) and verify that the downloaded ZIP contains all files from the workspace and all libraries (e.g., Dojo).
            Using MAMP, XAMPP or other localhost server, unzip the contents of ZIP onto your localhost server and verify that the HTML files can be opened successfully.</li>
        <li>Click on Sample1.html to select it, then Ctl-click (Cmd-Click on Mac) on app.css and SampleBanner.jpg to select them, also. 
            Click on the second icon in the button bar to download selected files. 
            Complete process (accepting defaults) and verify that the downloaded ZIP contains all files from the workspace and all libraries (e.g., Dojo).
            Using MAMP, XAMPP or other localhost server, unzip the contents of ZIP onto your localhost server and verify that the HTML files can be opened successfully.</li>
        <li>Use 3rd icon (Modify libraries) to move Dojo to different locations, such as ./dojo and ./mylibs/dojo. Verify that Sample1.html successfully reopens and works in preview-in-browser after each relocation.</li>
    </ol>
    <h3 class="expectedResults_subsection">Expected results</h3>
    <ol class="expectedResults">
        <li>See description above for expected results.</li>
    </ol>

</body>
</html>
